package com.zhou.utils.easyExcel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
public class ExcelListener<T> extends AnalysisEventListener<T> {
 
    private List<T> data = new ArrayList<>();
 
    @Override
    public void invoke(T object, AnalysisContext context) {
        data.add(object);
    }
 
    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {
    }
}